import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit'

const initialState: any = {}
const userInfoStore = createSlice({
  name: 'userInfo',
  initialState,
  reducers: {
    setUserInfo(state, action: PayloadAction<any>) {
      return state = action.payload
    }
  }
});

export const { setUserInfo } = userInfoStore.actions;
export default userInfoStore.reducer;
